package org.zuel.boot.demo.exception;

/**
 * 参数异常类，用于处理参数相关错误
 */
public class ParameterException extends RuntimeException {

    // 构造函数
    public ParameterException() {
        super("参数对象为空");
    }

    public ParameterException(String message) {
        super(message);
    }

    public ParameterException(String message, Throwable cause) {
        super(message, cause);
    }

    public ParameterException(Throwable cause) {
        super(cause);
    }

    // 可选：添加自定义方法
    public static void check(Object parameter, String message) {
        if (parameter == null) {
            throw new ParameterException(message);
        }
    }
}